"""
配置参数
"""
import os
import csv
import sys
import random

MODE = 'Debug'  # Debug or Info

if os.name == 'nt':
    # print("当前系统类型为:",os.name)
    WEBDRIVERURI = os.path.abspath(
        "E:/GenEnv/webdriver/86/chromedriver.exe")  # 根据系统类型返回绝对路径D:\GenEnv\webdriver\chromedriver.exe
else:
    WEBDRIVERURI = os.path.abspath('/usr/driver/chromedriver')

if MODE == 'Debug':
    # USERNAME = 'funtest01'
    # PASSWORD = '123123'
    USERNAME = 'passwd01'
    PASSWORD = '123123'
else:
    USERNAME = None
    PASSWORD = None
    with open('../Data/datafile.csv', 'r') as f:
        f_csv = csv.reader(f)
        rowindex = random.randint(0, 3)
        for index, row in enumerate(f_csv):
            if index == rowindex:
                USERNAME = row[0]
                PASSWORD = row[1]


WaitTime = 1.5